package nsd.test.zy01;

public class Student {
    private int stuId;
    private String stuName;
    private int grade;

    public int getStuId() {
        return stuId;
    }

    public void setStuId(int stuId) {
        this.stuId = stuId;
    }

    public String getStuName() {
        return stuName;
    }

    public void setStuName(String stuName) {
        this.stuName = stuName;
    }

    public int getGrade() {
        return grade;
    }

    public void setGrade(int grade) {
        this.grade = grade;
    }

    public Student(int stuId, String stuName, int grade) {
        this.stuId = stuId;
        this.stuName = stuName;
        this.grade = grade;
    }

    public static void px(Student[] s){
        for(int i=0;i<s.length-1;i++) {
            for(int j=0;j<s.length-1-i;j++){
                if(s[j].grade<s[j+1].grade){
                    Student t=s[j];
                    s[j]=s[j+1];
                    s[j+1]=t;
                }
            }
        }
    }
    public void show() {
        System.out.println(stuId+"--"+stuName+"--"+grade);
    }
}
